//
//  RMMTaoCanDetialBottomView.m
//  Romomo
//
//  Created by puman on 2016/12/28.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMTaoCanDetialBottomView.h"

@implementation RMMTaoCanDetialBottomView
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        self.backgroundColor = kWhiteColor;
        
        UILabel *lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width, 0.5)];
        lineLabel.backgroundColor = RGBA(221, 221, 221, 1);
        [self addSubview:lineLabel];
        
        self.totalPriceLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, lineLabel.bottom + 9, kScreenWideth - 135 - 15, 15)];
        self.totalPriceLabel.text = @"总计: ¥0.00";
        self.totalPriceLabel.font = kFont(14);
        self.totalPriceLabel.textColor = COLORFROMCODE(0x303137, 1);
        [self addSubview:self.totalPriceLabel];
        
        _youHuiLabel = [[UILabel alloc] initWithFrame:CGRectMake(_totalPriceLabel.left, _totalPriceLabel.bottom, _totalPriceLabel.width, 14)];
        _youHuiLabel.text = @"已优惠: ¥0.00";
        _youHuiLabel.font = kFont(10);
        _youHuiLabel.textColor = COLORFROMCODE(0xBFBFBF, 1);
        [self addSubview:_youHuiLabel];
        
        _goBuyBut = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _goBuyBut.frame = CGRectMake(kScreenWideth - 165, 7, 150, 35);
        _goBuyBut.layer.cornerRadius = 16;
        [_goBuyBut setTitleColor:kWhiteColor forState:(UIControlStateNormal)];
        _goBuyBut.titleLabel.font = kBFont(14);
        _goBuyBut.backgroundColor = kBasicColor;
        [_goBuyBut setTitle:@"立即购买" forState:(UIControlStateNormal)];
        [self addSubview:_goBuyBut];
        
        
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
